package gazzera.node.core.messages;

import gazzera.utils.*;

import java.io.*;


public class ChunkSearch extends Message
{

	public FileID fileId = null;
	public long size = 0;
	
	
	
	public ChunkSearch()
	{
		super();
	}

	public ChunkSearch(FileID fileId, long size)
	{
		super();
		this.fileId = fileId;
		this.size = size;
	}

	@Override
	protected void recv(DataInputStream s) throws IOException
	{
		fileId = readFileID(s);
		size = readLong(s);
	}

	@Override
	protected void send(DataOutputStream s) throws IOException
	{
		sendFileID(s, fileId);
		sendLong(s, size);
	}

}
